#ifndef _GAIT_H_
#define _GAIT_H_

#include <stdbool.h>
#include "datapool.h"

#define PI 3.14159265358979f

void GetGamma(float L, float theta, float &gamma);
void CartesianToLegParams(float x, float y, float leg_direction, float &L, float &theta);
void CartesianToThetaGamma(float x, float y, float leg_direction, float &theta, float &gamma);
void gait(GaitParams params, float leg0_offset, float leg1_offset, float leg2_offset, float leg3_offset);
void MoveLeg(LegsName leg, float t, GaitParams params, float gait_offset, float leg_direction, float &theta, float &gamma);


//测试
void Newdog_CartesianToThetaGamma(float x, float y, float leg_direction, float &theta, float &gamma);//xy
void Newdog_MoveLeg(LegsName leg, float t, GaitParams params, float gait_offset, float leg_direction, float &theta, float &gamma,float &alpha);
void Newdog_CartesianToMotorAngle(float x, float y,float z, float leg_direction, float &theta, float &gamma,float &alpha);//xyz

#endif